<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link rel="stylesheet" type="text/css" href="/skin/css/amazeui.min1.css" />
<link href="/skin/font/iconfont.css" rel="stylesheet" type="text/css" />
<link href="/skin/css/index.css" rel="stylesheet" type="text/css" />
<script src="/user/js/jquery.js"></script>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title>在线反馈-会员中心</title>
<style>
/* 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值 */
a{-webkit-tap-highlight-color:transparent;outline:none;}
body { background: #f3f5f8; }

/* 页面容器 */
.feedback-container {
	padding: 0.16rem;
}

/* 反馈列表卡片 */
.feedback-list-card {
	background: #fff;
	border-radius:0.04rem;
	padding: 0.16rem;
	margin-bottom: 0.16rem;
	box-shadow: 0 0.03rem 0.18rem rgba(0,0,0,.05);
}
.list-title {
	font-size: 0.16rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.16rem;
}

/* 反馈项 */
.feedback-item {
	background: #f8fafc;
	border-radius: 0.08rem;
	padding: 0.14rem;
	margin-bottom: 0.12rem;
	border-left: 0.03rem solid #cbd5e1;
}
.feedback-item:last-child {
	margin-bottom: 0;
}
.feedback-item.replied {
	border-left-color: #16a34a;
}
.feedback-item.waiting {
	border-left-color: #f59e0b;
}

/* 反馈内容 */
.feedback-content-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 0.08rem;
}
.feedback-text {
	flex: 1;
	font-size: 0.14rem;
	color: #1e293b;
	line-height: 1.5;
	margin-right: 0.12rem;
}
.feedback-time {
	font-size: 0.12rem;
	color: #94a3b8;
	white-space: nowrap;
}

/* 回复内容 */
.reply-row {
	background: #fff;
	border-radius: 0.06rem;
	padding: 0.12rem;
	margin-top: 0.08rem;
}
.reply-label {
	font-size: 0.12rem;
	color: #16a34a;
	font-weight: 600;
	margin-bottom: 0.04rem;
}
.reply-text {
	font-size: 0.13rem;
	color: #475569;
	line-height: 1.5;
}
.waiting-reply {
	font-size: 0.13rem;
	color: #94a3b8;
	font-style: italic;
	margin-top: 0.08rem;
}

/* 空状态 */
.empty-state {
	text-align: center;
	padding: 0.6rem 0;
	color: #94a3b8;
	font-size: 0.14rem;
}

/* 提交反馈卡片 */
.feedback-form-card {
	background: #fff;
	border-radius:0.04rem;
	padding: 0.16rem;
	box-shadow: 0 0.03rem 0.18rem rgba(0,0,0,.05);
}
.form-title {
	font-size: 0.16rem;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 0.12rem;
}
.feedback-textarea {
	width: 100%;
	min-height: 1.2rem;
	border: 0.01rem solid #e2e8f0;
	border-radius: 0.08rem;
	padding: 0.12rem;
	font-size: 0.14rem;
	color: #1e293b;
	line-height: 1.6;
	resize: vertical;
	outline: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-tap-highlight-color: transparent;
}
.feedback-textarea::placeholder {
	color: #cbd5e1;
}
.feedback-textarea:focus {
	border-color: #253043;
}

/* 提交按钮 */
.submit-btn {
	width: 100%;
	height: 0.48rem;
	border: 0;
	border-radius: 0.1rem;
	background: #253043;
	color: #fff;
	font-size: 0.16rem;
	font-weight: 700;
	margin-top: 0.16rem;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	outline: none;
}
.submit-btn:active {
	background: #1f2937;
}
</style>
<script>
	// 设计稿 375px，1rem = 100px，换算方法：px值 ÷ 100 = rem值
	(function(){
		var docEl = document.documentElement;
		var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
		function recalc() {
			var clientWidth = docEl.clientWidth;
			if (!clientWidth) return;
			docEl.style.fontSize = (clientWidth / 375 * 100) + 'px';
		}
		if (!document.addEventListener) return;
		window.addEventListener(resizeEvt, recalc, false);
		document.addEventListener('DOMContentLoaded', recalc, false);
		recalc();
	})();
</script>
</head>
<body class="body">
<div class="main">
<div class="message">
	<header id="header">
		<section class="head-b head-b1">
			<span class="u-left"><a href="/user/" class="back"><img src="/skin/img/back.png"/></a></span>
			<h1 id="t0">在线反馈</h1>
			<div class="u-right" href="#">
				<a href="/" class="hSearch right"><img src="/skin/img/i_home.png"/></a>
			</div>
		</section>
	</header>
	
	<div class="feedback-container">
		<!-- 反馈列表 -->
		{if($msg==0)}
		<div class="feedback-list-card">
			<div class="list-title">反馈列表</div>
			<div class="empty-state">暂无反馈记录</div>
		</div>
		{else}
		<div class="feedback-list-card">
			<div class="list-title">反馈列表</div>
			{loop $flist $key as $list}
			<div class="feedback-item {if($list[state]==1)}replied{else}waiting{/if}">
				<div class="feedback-content-row">
					<div class="feedback-text">{$list[content]}</div>
					<div class="feedback-time">{$list[addtime]}</div>
				</div>
				{if($list[state]==1)}
				<div class="reply-row">
					<div class="reply-label">客服回复：</div>
					<div class="reply-text">{$list[replay]}</div>
					<div class="feedback-time" style="margin-top:0.06rem;">{$list[replaytime]}</div>
				</div>
				{else}
				<div class="waiting-reply">暂未回复，请耐心等待</div>
				{/if}
			</div>
			{/loop}
		</div>
		{$page}
		{/if}
		
		<!-- 提交新反馈 -->
		<div class="feedback-form-card">
			<form class="fankui">
				<div class="form-title">提交反馈</div>
				<textarea class="feedback-textarea" name="t0" placeholder="请输入您要反馈的问题"></textarea>
				<button class="submit-btn" type="button" onclick="fankui();">提交反馈</button>
			</form>
		</div>
	</div>
	
	<script>
		function fankui(){
			var content = $('textarea[name="t0"]').val().trim();
			if(!content) {
				alert('请输入反馈内容');
				return;
			}
			
			$.ajax({
				type:"post",
				dataType:"json",
				url:"/Moudelu.php?m=m&a=liuyan",
				data:$(".fankui").serialize(),
				success:function(d){
					if(d[0]==0){
						alert(d[1]);
					}
					else{
						alert(d[1]);
						window.location.href='fankui.php';
					}
				}
			});				
		}
	</script>
</div>
</div>
{include(foot)}
</body>
</html>
